﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace Public.Ocean.Petrel.Extensions.Internal
{
    public static class ExpressionExtensions
    {
        public static string ExtractName<T, U>(this Expression<Func<T, U>> expression)
        {
            var member = expression.Body as MemberExpression;
            return member.Member.Name;
        }
    }
}
